import { ICompany, IMenu } from '@/models/menu.interface';
import { IBaseResponse } from '@/models/response.interface';

import http from './http';

export const getPageMenu = (params: Record<string | number | symbol, any>) => {
  const config = {
    params,
  };
  return http.get<IBaseResponse<IMenu[]>>(`/api/raysdata-tenant/site/pageConfig/pageMenu`, config);
};

export const getCompanyInfo = () => {
  return http.get<IBaseResponse<ICompany>>(`/api/raysdata-tenant/site/pageConfig/companyInfo`);
};

// export const getSearchList = params => get(`${url}/searchList`, params);

// /**
//  *
//  * @param {string} dataName
//  */
// export const getHomeCustomData = async dataName => {
//   const params = {
//     dataName
//   };
//   const { data } = await get(`${url}/api/raysdata-tenant/site/pageConfig/customData`, params);
//   return JSON.parse(data.data.data);
// }
